package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 城市表 city
 *
 * @author ruoyi
 */
public class City extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 省市区名称 */
    private String name;

    /** 上级ID */
    private Long parentid;

    /** 简称 */
    private String shortname;

    /** 级别:0,中国；1，省分；2，市；3，区、县 */
    private Integer leveltype;

    /** 城市代码 */
    private String citycode;

    /** 邮编 */
    private String zipcode;

    /** 经度 */
    private String lng;

    /** 纬度 */
    private String lat;

    /** 拼音 */
    private String pinyin;

    /** 状态 '0','1' */
    private String status;

    /**
     * uni-data-picker 需要的字段
     * 为了避免在服务层进行复杂的转换，直接在这里添加
     */
    private Long value;
    private String text;
    private List<City> children = new ArrayList<City>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
        this.value = id; // 同时设置 value
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        this.text = name; // 同时设置 text
    }

    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public String getShortname() {
        return shortname;
    }

    public void setShortname(String shortname) {
        this.shortname = shortname;
    }

    public Integer getLeveltype() {
        return leveltype;
    }

    public void setLeveltype(Integer leveltype) {
        this.leveltype = leveltype;
    }

    public String getCitycode() {
        return citycode;
    }

    public void setCitycode(String citycode) {
        this.citycode = citycode;
    }

    public String getZipcode() {
        return zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<City> getChildren() {
        return children;
    }

    public void setChildren(List<City> children) {
        this.children = children;
    }
} 